from encrypt import encryptAES
import requests
import json

credentials = {"token": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VySWQiOjcwMzE2MTYsImFjY291bnQiOiIxMDAwNSIsInBob25lIjoiMTAwMDAwMjAyIiwidXVpZCI6ImViMDM2MTM0LWU2ZTctNDVmMi1hZGU0LTM5ZmZlZWE4ZjY3ZiIsIm5pY2tOYW1lIjoi5aW9Iiwic3ViIjoiNzAzMTYxNiIsImlhdCI6MTc1MzAxMDMzMywiZXhwIjoxNzUzNzIxOTA3fQ.dktrsaUDD8YuZanrzMuihEedv7YDzyqKZ3SC6KLWhme56iaZ1rpbSl4ymaqXBaUg5JqSpoKH2KcFtBKnYWqMRQ"}

# 请求参数
url = "https://slbapi.sootoken.com.cn/api/newProduct/getProductDetails"
data = {
    "id": 800107098
}

# 发送请求
headers = {
    "Authorization": credentials["token"],
    "Content-Type": "application/json",
    "x-signature": encryptAES(data)
}
print(data)
print(headers)
response = requests.post(
    url,
    json=data,  # 如果是表单格式
    headers=headers
)

# 输出结果
print(response.text)